home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-04 | 56.7 KB | 1,552 lines |
- C.S.M.P. Digest Mon, 11 May 92 Volume 1 : Issue 77
-
- Today's Topics:
-
- application error messages
- 232KBaud serial rate on Mac
- Notification alerts kills the foreground application...
- What is an 'scod' resource?
- developing for mac ?
- PPC Programming
- MMU dcmd??
- Notification color icons
- Appletalk printing problems
- Extra QD Text Styles - how??
- BalloonWriter
- Playing non-MIDI frequencies
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list. The last several issues of the digest are available from
- sumex-aim.stanford.edu as well.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The digest is a collection of articles from the internet newsgroup comp.sys.
- mac.programmer. It is designed for people who read c.s.m.p. semi-regularly
- and want an archive of the discussions. If you don't know what a newsgroup
- is, you probably don't have access to it. Ask your systems administrator(s)
- for details. (This means you can't post questions to the digest.)
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: duncan@convex.csd.uwm.edu (Shan D Duncan)
- Subject: application error messages
- Date: 9 Apr 92 15:46:09 GMT
- Organization: University of Wisconsin - Milwaukee
-
-
- Is there a list of the very informative error message the Mac
- sometimes hands out?
-
- For example when using MS word - the application will quit and
- the message application suddenly quite type 2 error.
-
-
- Looking in the system manual that came with our Si - it
- mentions to make a note of the error number - but I can not find
- a listing of them.
-
-
- Is there a complete list?
-
-
- - -Thanks
-
- +++++++++++++++++++++++++++
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Date: 9 Apr 92 20:16:50 GMT
- Organization: The World Public Access UNIX, Brookline, MA
-
- System Errors DA (ie: Display DA) contains a list of all error codes.
-
-
- - --
- <--------------------------------------------------->
- joe zobkiw zobkiw@world.std.com
- mac.synthesis.MIDI.development.C.asm.communications
- >---------------------------------------------------<
-
- ---------------------------
-
- From: green@eniac.seas.upenn.edu (Bradley Green )
- Subject: 232KBaud serial rate on Mac
- Date: 9 Apr 92 18:11:32 GMT
- Organization: University of Pennsylvania
-
- OK, I'll try you guys again. Does anybody out there know how to get
- speeds > 35KBaud out of the Mac serial interface without using AppleTalk?
- A code sample or good reference book would be great - IA doesn't have
- much of use.
-
- Several people have written to me to see if I got any respose, so the
- interest is out there
-
- Brad
-
- +++++++++++++++++++++++++++
-
- From: sje@xylos.ma30.bull.com (Steven J. Edwards)
- Date: 9 Apr 92 21:49:34 GMT
- Organization: Bull HN, Worldwide Information Systems, Billerica, Mass., USA
-
- In article <73458@netnews.upenn.edu> green@eniac.seas.upenn.edu (Bradley Green ) writes:
- > OK, I'll try you guys again. Does anybody out there know how to get
- > speeds > 35KBaud out of the Mac serial interface without using AppleTalk?
- > A code sample or good reference book would be great - IA doesn't have
- > much of use.
- >
- > Several people have written to me to see if I got any respose, so the
- > interest is out there
-
- I use the commercial utility LapLinkMac (Travelling Software)
- to set up a 115200 baud link from a Mac Plus to a PC clone, so it is
- possible to exceed the normal Mac limits without using AppleTalk. The
- quality of the transfer is very good. Perhaps you might buy a copy
- and ask their tech support how it's done.
-
- I suspect that the PC side of LLM involves reprogramming the
- UART or some similar low level trickery because the PC is not
- necessarially restored to its default state after a transfer. Perhaps
- LLM on the Mac side reprograms the Zilog SCC? The later Mac models
- may have different low level feature access protocol because of
- greater VLSI and ASIC usage.
-
- The very early (1984) hard drives were accessed via a serial
- port and I think that they also ran faster than 57600 baud.
-
- [The above opinions expressed are my own; not necessarily held by others.]
- == Steven J. Edwards Bull HN Information Systems Inc. ==
- == (508) 294-3484 300 Concord Road MS 820A ==
- == sje@xylos.ma30.bull.com Billerica, MA 01821 USA ==
- "That Government which Governs the Least, Governs Best." -- Thomas Jefferson
-
- +++++++++++++++++++++++++++
-
- From: jcav@quads.uchicago.edu (JohnC)
- Date: 9 Apr 92 20:13:45 GMT
- Organization: The Royal Society for Putting Things on Top of Other Things
-
- In article <73458@netnews.upenn.edu> green@eniac.seas.upenn.edu (Bradley Green ) writes:
- >OK, I'll try you guys again. Does anybody out there know how to get
- >speeds > 35KBaud out of the Mac serial interface without using AppleTalk?
- >A code sample or good reference book would be great - IA doesn't have
- >much of use.
-
- The standard serial drivers will go up to 57K baud.
-
- - --
- John Cavallino | EMail: jcav@midway.uchicago.edu
- University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu
- Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
- B0 f++ c+ g+ k s++ e+ h- pv | Chicago, IL 60637
-
- ---------------------------
-
- From: sundinKC@dna.lth.se (Anders Sundin)
- Subject: Notification alerts kills the foreground application...
- Date: 24 Mar 92 11:50:13 GMT
- Organization: Organic Chemistry 2, Lund University, Sweden
-
- I find it very irritating that alert notifications still are
- "owned" by the foreground application. This means that the
- foreground application STOPS...
-
- It does not make me happy when I find that the number crunching
- application I left in the foreground over the weekend stopped
- at Friday 6.00 PM because I got a notification alert from somewhere.
-
- Irony Alert!
- I suppose I should be happy that the foreground application was not
- controlling a chemical plant or a heart-lung machine at a hospital.
- I guess that such things should be done on a PC instead.
- End irony alert!
- - --
- Anders Sundin e-mail: sundinKC@dna.lth.se
- Organic Chemistry 2 Anders.Sundin@orgk2.lth.se
- University of Lund ok2aps@gemini.ldc.lu.se
- P.O. Box 124 ok2aps@seldc52.bitnet
- S-22100 Lund phone: +46 46 108214
- Sweden fax: +46 46 108209
-
- +++++++++++++++++++++++++++
-
- From: DN5@psuvm.psu.edu (D. Jay Newman)
- Date: 24 Mar 92 14:00:58 GMT
- Organization: Penn State University
-
- In article <1992Mar24.115013.4553@lth.se>, sundinKC@dna.lth.se (Anders Sundin)
- says:
-
- >I find it very irritating that alert notifications still are
- >"owned" by the foreground application. This means that the
- >foreground application STOPS...
-
- I fully agree! I use PopMail II, and this is my major complaint. I
- just wish that people would use the "flashing icon" style alert (when
- the icon in the menubar starts flashing, then you know you should go
- and do something about it -- it doesn't stop the top process!
-
- I have had an overnight backup stopped right after I left, because I
- forgot to quit PopMail and some new mail arrived.
-
- I really shouldn't have an application stopped -- even a background
- application, but especially not the foreground one -- just because
- somebody wants to tell me something!
-
- ()()()()()()()()()()()()() CBEL--Teaching & Learning Technologies ()()()
- D. Jay Newman ! Have you ever wondered who
- dn5@psuvm ! Caspar the Friendly Ghost
- dn5@psuvm.psu.edu ! was when he was alive?
-
- +++++++++++++++++++++++++++
-
- From: damurphy@wc.novell.com (Duane A Murphy)
- Organization: Novell, Inc. - Walnut Creek
- Date: Tue, 24 Mar 1992 16:41:59 GMT
-
- In article <92084.090058DN5@psuvm.psu.edu> DN5@psuvm.psu.edu (D. Jay Newman) writes:
- >In article <1992Mar24.115013.4553@lth.se>, sundinKC@dna.lth.se (Anders Sundin)
- >says:
- >
- >>I find it very irritating that alert notifications still are
- >>"owned" by the foreground application. This means that the
- >>foreground application STOPS...
- >
- >I fully agree! I use PopMail II, and this is my major complaint. I
- >just wish that people would use the "flashing icon" style alert (when
- >the icon in the menubar starts flashing, then you know you should go
- >and do something about it -- it doesn't stop the top process!
- >
-
- I too find this especially annoying. But I dont think that it is the
- Notification Managers fault. I place the blame on the applications.
- The Notification Manager provides three types of notification that are
- easily changed from within the application. It is a simple matter
- to provide preferences for the notification. If you dont mind the
- alerts (which I dispise) then you could use those. You can also use
- "Polite notification" (the flashing icon).
-
- Applications need to use the features that are available and give
- users access to set them the way that they like.
-
- Duane Murphy
- My opinions are just that _MY_ opinions.
-
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@iswed.nada.kth.se (Jon W{tte)
- Date: 25 Mar 92 12:39:47 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .edu> DN5@psuvm.psu.edu (D. Jay Newman) writes:
-
- I fully agree! I use PopMail II, and this is my major complaint. I
- just wish that people would use the "flashing icon" style alert (when
- the icon in the menubar starts flashing, then you know you should go
- and do something about it -- it doesn't stop the top process!
-
- Any conformant application written according to the rules
- lets you set the notification level you want; diamond,
- diamond&icon, or diamond,icon and alert.
-
- If it doesn't, it's just as bad as software locking
- handles by settin gthe high bit of the master pointer.
-
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- +++++++++++++++++++++++++++
-
- From: sundinKC@dna.lth.se (Anders Sundin)
- Date: 25 Mar 92 16:39:07 GMT
- Organization: Organic Chemistry 2, Lund University, Sweden
-
- Jon W{tte writes:
- > Any conformant application written according to the rules
- > lets you set the notification level you want; diamond,
- > diamond&icon, or diamond,icon and alert.
-
- Yes, thats is all very well. However, it is not enough.
- I don't want to check that every notification alert in
- every application, control panel, etc. is turned off
- before I start an important and time-consuming job.
- And how do I know I found them all?
-
- Our department has built a peptide-synthesis machine that is
- controlled by a Macintosh Plus. If that computer stopped because
- of a notification alert then it could cost us thousands of dollars.
- Currently we use System Software version 3.2 to be safe from any
- unwanted notification alerts.
-
- I run molecular mechanics programs (MM2(91) and MM3) and I also use
- semiempirical quantum mechanics (MOPAC) on my Macintosh IIfx.
- These programs are takes many hours or days to complete and they are
- always in danger of being stopped by a notification alert.
- I usually remember to turn off notification alerts in MacPost
- and to put the Finder in front before I leave for home...
-
- - --
- Anders Sundin e-mail: sundinKC@dna.lth.se
- Organic Chemistry 2 Anders.Sundin@orgk2.lth.se
- University of Lund ok2aps@gemini.ldc.lu.se
- P.O. Box 124 ok2aps@seldc52.bitnet
- S-22100 Lund phone: +46 46 108214
- Sweden fax: +46 46 108209
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
- Date: 25 Mar 92 20:45:35 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .se> sundinKC@dna.lth.se (Anders Sundin) writes:
-
- > Any conformant application written according to the rules
- > lets you set the notification level you want; diamond,
- > diamond&icon, or diamond,icon and alert.
-
- Yes, thats is all very well. However, it is not enough.
- I don't want to check that every notification alert in
- every application, control panel, etc. is turned off
- before I start an important and time-consuming job.
- And how do I know I found them all?
-
- Ah, but then the default should be level 2 (i.e. icon and diamond)
-
- If you REALLY want to, why not patch NmInstall to remove any alert
- strings it might have attached ? :-)
-
- - --
- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
-
- +++++++++++++++++++++++++++
-
- From: sundinKC@dna.lth.se (Anders Sundin)
- Date: 26 Mar 92 10:06:38 GMT
- Organization: Organic Chemistry 2, Lund University, Sweden
-
- Jon W{tte writes:
- > Ah, but then the default should be level 2 (i.e. icon and diamond)
- >
- > If you REALLY want to, why not patch NmInstall to remove any alert
- > strings it might have attached ? :-)
-
-
- Yes I agree. To use the Macintosh for scientific calculations or
- as a controller for instruments I will have to patch NmInstall.
- Maybe Apple will write a new TN on this subject. ;-)
- "How to avoid getting hit by a drunk and drive notification.".
- - --
- Anders Sundin e-mail: sundinKC@dna.lth.se
- Organic Chemistry 2 Anders.Sundin@orgk2.lth.se
- University of Lund ok2aps@gemini.ldc.lu.se
- P.O. Box 124 ok2aps@seldc52.bitnet
- S-22100 Lund phone: +46 46 108214
- Sweden fax: +46 46 108209
-
- +++++++++++++++++++++++++++
-
- From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
- Organization: University of Illinois at Urbana-Champaign
- Date: Thu, 26 Mar 1992 21:50:52 GMT
-
- D. Jay Newman <DN5@psuvm.psu.edu> writes:
- >I fully agree! I use PopMail II, and this is my major complaint. I
- >just wish that people would use the "flashing icon" style alert (when
- >the icon in the menubar starts flashing, then you know you should go
- >and do something about it -- it doesn't stop the top process!
-
- Eudora allows you to specify that they go away after a certain amount of
- time.
-
- I agree with the original point; the Notification Manager is EXTREMELY
- obnoxious. No doubt this is so that it can survive whatever screwy state
- the frontmost application might be in, and still do its job. However, it
- sure would be nice if something could be done about it.
-
- - --
- Steve Dorner, U of Illinois Computing Services Office
- Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
-
- +++++++++++++++++++++++++++
-
- From: time@ice.com (Tim Endres)
- Date: 27 Mar 92 15:10:54 GMT
- Organization: ICE Engineering, Inc.
-
-
- In article <D88-JWA.92Mar25214535@hemul.nada.kth.se> (comp.sys.mac.programmer), d88-jwa@hemul.nada.kth.se (Jon W{tte) writes:
- > Ah, but then the default should be level 2 (i.e. icon and diamond)
- >
- > If you REALLY want to, why not patch NmInstall to remove any alert
- > strings it might have attached ? :-)
-
- Fear not brave soldiers! My Control Panel for doing this is just about
- ready for release. It will take those nasty notifies with strings,
- and copy the strings into the Control Panel's list, then just do the
- icon and mark (i.e. removes the string)!
-
- Give me the weekend and I will put it up for ftp.
-
- tim.
-
-
- tim endres - time@ice.com -or- uupsi!tbomb!time
- ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208
- 8840 Main Street, Whitmore Lake, MI 48189
- USENET - a slow moving self parody... ph
-
- +++++++++++++++++++++++++++
-
- From: time@ice.com (Tim Endres)
- Date: 27 Mar 92 15:10:54 GMT
- Organization: ICE Engineering, Inc.
-
-
- In article <D88-JWA.92Mar25214535@hemul.nada.kth.se> (comp.sys.mac.programmer), d88-jwa@hemul.nada.kth.se (Jon W{tte) writes:
- > Ah, but then the default should be level 2 (i.e. icon and diamond)
- >
- > If you REALLY want to, why not patch NmInstall to remove any alert
- > strings it might have attached ? :-)
-
- Fear not brave soldiers! My Control Panel for doing this is just about
- ready for release. It will take those nasty notifies with strings,
- and copy the strings into the Control Panel's list, then just do the
- icon and mark (i.e. removes the string)!
-
- Give me the weekend and I will put it up for ftp.
-
- tim.
-
-
- tim endres - time@ice.com -or- uupsi!tbomb!time
- ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208
- 8840 Main Street, Whitmore Lake, MI 48189
- USENET - a slow moving self parody... ph
-
- +++++++++++++++++++++++++++
-
- From: cory@howtek.UUCP (Cory Kempf)
- Date: 9 Apr 92 17:10:50 GMT
- Organization: Howtek, Inc. Hudson, New Hampshire
-
-
- In article <1CE00001.vh99e3@tbomb.ice.com> (comp.sys.mac.programmer), time@ice.com (Tim Endres) writes:
- >In article <D88-JWA.92Mar25214535@hemul.nada.kth.se> (comp.sys.mac.programmer), d88-jwa@hemul.nada.kth.se (Jon W{tte) writes:
- >> If you REALLY want to, why not patch NmInstall to remove any alert
- >> strings it might have attached ? :-)
- >
- >Fear not brave soldiers! My Control Panel for doing this is just about
- >ready for release. It will take those nasty notifies with strings,
- >and copy the strings into the Control Panel's list, then just do the
- >icon and mark (i.e. removes the string)!
- >
- >Give me the weekend and I will put it up for ftp.
-
- And there will be much rejoicing!!!!!!!!!!!!!!!!
-
- Do you know if it would be able to deal with AppleShare volumes going
- away? Or spurious DiskInit alerts?
-
- A real obnoxious problem that I have been having with uAccess (though
- by no means the fault of uAccess) is when I leave for the night, my
- file server often decides to go away, bringing up an alert that seems
- to stop the Mac, or (if I forget to put a disk in the CD Drive), I
- get an alert asking me if I want to initialize the disk in the CD
- drive.
-
- +C
-
-
- - ---------------------------------------------------------------
- Cory Kempf domain: cory@howtek.uucp
- Howtek, Inc. bang: decvax!fasfax!howtek!cory
- Remember: Never play russian roulette with a semi-automatic.
-
- ---------------------------
-
- Organization: Queen's University at Kingston
- Date: Friday, 27 Mar 1992 23:25:10 EST
- From: <CHARLESW@QUCDN.QueensU.CA>
- Subject: What is an 'scod' resource?
-
- Can someone point me to information on what an 'scod' resource is?
- (I'm getting locked up there in a "very large" loop waiting for something.)
-
- Thanks,
-
- .../dave Dave Charlesworth
-
- +++++++++++++++++++++++++++
-
- From: cory@enigami.mv.com (Cory Kempf)
- Date: Tue, 31 Mar 92 18:44:24 EST
- Organization: EnigamI, Inc., Nashua, NH
-
-
- In article <92087.232510CHARLESW@QUCDN.QueensU.CA> (comp.sys.mac.programmer), <CHARLESW@QUCDN.QueensU.CA> writes:
- > Can someone point me to information on what an 'scod' resource is?
- >(I'm getting locked up there in a "very large" loop waiting for something.)
-
- Multifinder. Under System 7.
-
- +C
-
-
- - -------------------------------------------------------------
- Cory Kempf EnigamI, Inc.
- cory@enigami.mv.com ...!decvax!enigami!cory
- Never play Russian Roulette with a semi-automatic.
-
- +++++++++++++++++++++++++++
-
- From: REEKES@applelink.apple.com (Jim Reekes)
- Date: 9 Apr 92 20:01:15 GMT
- Organization: Apple Computer, Inc.
-
- In article <92087.232510CHARLESW@QUCDN.QueensU.CA>, CHARLESW@QUCDN.QueensU.CA writes:
- >
- >
- > Can someone point me to information on what an 'scod' resource is?
- > (I'm getting locked up there in a "very large" loop waiting for something.)
- >
- > Thanks,
- >
- > ..../dave Dave Charlesworth
-
- It's one of the Process Manager's code segements. The Process Manager is
- actually an application. It has all of the normal things a standard app
- would have including the code segments, a jump table, QuickDraw globals,
- A5 globals, etc. All of the code segments have been given a special type,
- 'scod'. You'll even notice patches to GetResource that will replace 'CODE'
- with 'scod' to allow the LoadSeg trap to work with the Process Manager's code.
-
- Jim
-
- ---------------------------
-
- From: mlindholm@cc.helsinki.fi
- Subject: developing for mac ?
- Date: 31 Mar 92 19:22:37 GMT
- Organization: University of Helsinki
-
-
- I'd like to get information of development
- environments which produce code both for
- Macintosh and DOS or Windows. So I have to
- write the code only once.
-
- Thanks in advance.
-
- mlindholm@cc.helsinki.fi
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 8 Apr 92 23:19:17 GMT
- Organization: MacDTS Mongols
-
- In article <1992Mar31.212237.1@cc.helsinki.fi>, mlindholm@cc.helsinki.fi writes:
- >
- >
- > I'd like to get information of development
- > environments which produce code both for
- > Macintosh and DOS or Windows. So I have to
- > write the code only once.
- >
- > Thanks in advance.
- >
- > mlindholm@cc.helsinki.fi
-
- SmallTalk/V, xvt, Universal Component system, a lot of other
- rumored frameworks here real soon now.
-
- Cheers,
- Kent
-
- - --
- Kent Sandvik/DTS - Dynamic Language Evangelist.
- Opinions expressed are not private, and not owned by any company,
- organization or group. Happy happy, joy joy!
-
- ---------------------------
-
- From: camrose@cs.mcgill.ca ()
- Subject: PPC Programming
- Organization: SOCS, McGill University, Montreal, Canada
- Date: Sat, 28 Mar 1992 20:50:35 GMT
-
-
-
- Does anyone out there have any experience with the PPC Toolbox? I am
- currently in the midst of writing an application that needs to utilize
- this Mac feature. It seems as though this is pretty virgin ground
- judging by the amount of literature on it -- or am I missing something?
- (Very, very possible!!!!) If anyone can answer some questions for me or
- direct me in the direction of some literature, I would be more than
- grateful.
-
-
- Jason Vantomme
-
-
-
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 9 Apr 92 01:48:25 GMT
- Organization: MacDTS Mongols
-
- In article <1992Mar28.205035.20240@cs.mcgill.ca>, camrose@cs.mcgill.ca writes:
- >
- >
- >
- > Does anyone out there have any experience with the PPC Toolbox? I am
- > currently in the midst of writing an application that needs to utilize
- > this Mac feature. It seems as though this is pretty virgin ground
- > judging by the amount of literature on it -- or am I missing something?
- > (Very, very possible!!!!) If anyone can answer some questions for me or
- > direct me in the direction of some literature, I would be more than
- > grateful.
-
- IM VI should cover a lot of ground - also check out Kibitz, a DTS
- sample that has a lot of PPC code which could be re-cycled.
-
- Cheers,
- Kent Sandvik, Dynamic Language Propagandist
-
- ---------------------------
-
- From: neal@farallon.com (Neal Trautman)
- Subject: MMU dcmd??
- Date: 31 Mar 92 20:56:38 GMT
- Organization: Farallon Computing, Inc.
-
- Anyone have a dcmd, for MacsBug or TMON Pro,
- that will allow me to manipulate the MMU and
- "write-protect" an area of memory??
-
- I need to figure out who's writing garbage on top
- of my CODE resources.
-
- Neal Trautman
- Timbuktu Lead Software Engineer
- Farallon Computing, Inc.
- neal@farallon.com
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 9 Apr 92 02:50:20 GMT
- Organization: MacDTS Mongols
-
- In article <249@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes:
- >
- > Anyone have a dcmd, for MacsBug or TMON Pro,
- > that will allow me to manipulate the MMU and
- > "write-protect" an area of memory??
-
- > I need to figure out who's writing garbage on top
- > of my CODE resources.
-
- SADE 1.4a1, on ETO#6, has memory address MMU protection
- (heh, something good with SADE...).
-
- Cheers,
- Kent Sandvik, Dynamic Language Prophet
-
- ---------------------------
-
- From: piovanel@ghost.dsi.unimi.it (marco piovanelli)
- Subject: Notification color icons
- Organization: Computer Science Dep. - Milan University
- Date: Wed, 8 Apr 1992 11:48:27 GMT
-
- I have a small application that can work in background to process
- apple events, and sometimes needs to interact with the user.
- If it's in the bg, it posts a polite notification request by calling
- AEInteractWithUser with a NIL parameter. IM 6 says this will default
- to a standard behavior. Yet, what I get is a flashing SICN in the
- menubar (the SICN resource has the same ID as the ID of the application's
- icon family). I would like to get a color icon (i.e. ics8 or ics4) used
- instead, at least on a color screen.
- Now: IM 6 says I should put in the nmIcon field of a NM request record
- a *HANDLE TO AN ICON FAMILY*. What does this mean exactly?
- Should I pass a handle to an ics8 resource, for example?
- How could the Notification Manager tell a handle to a SICN from a
- handle to a resource of a different kind?
-
- Thanx in advance for any hints on this issue.
-
-
- +++++++++++++++++++++++++++
-
- From: leonardr@ccs.itd.umich.edu
- Date: 9 Apr 92 17:29:09 GMT
- Organization: Campus Computing Sites, University of Michigan-Ann Arbor
-
- In article <1992Apr8.114827.1815@ghost.dsi.unimi.it> piovanel@ghost.dsi.unimi.it (marco piovanelli) writes:
- >I have a small application that can work in background to process
- >apple events, and sometimes needs to interact with the user.
- >If it's in the bg, it posts a polite notification request by calling
- >AEInteractWithUser with a NIL parameter. IM 6 says this will default
- >to a standard behavior. Yet, what I get is a flashing SICN in the
- >menubar (the SICN resource has the same ID as the ID of the application's
- >icon family). I would like to get a color icon (i.e. ics8 or ics4) used
- >instead, at least on a color screen.
- > Now: IM 6 says I should put in the nmIcon field of a NM request record
- > a *HANDLE TO AN ICON FAMILY*. What does this mean exactly?
- > Should I pass a handle to an ics8 resource, for example?
- > How could the Notification Manager tell a handle to a SICN from a
- > handle to a resource of a different kind?
- >
- An IconFamily, is an "as yet undocumented" data structure which is
- part of the also "as yet undocumented" Icon Manager, which is the part of
- System 7 that the Finder, Chooser, Notification Manager, etc. use to draw
- the appropriate icons.
-
- MacDTS is preparing (has already released??) a Tech Note which
- documents some of the parts of the Icon Manager, but I don't know if that
- includes the info for creating & disposing IconFamilies.
-
-
- - --
- - -----------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@ccs.itd.umich.edu
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, inc. GEnie: MACgician
-
- +++++++++++++++++++++++++++
-
- From: wombat@claris.com (Scott Lindsey)
- Date: 9 Apr 92 21:19:39 GMT
- Organization: Claris Corporation
-
- In article <1992Apr8.114827.1815@ghost.dsi.unimi.it>, piovanel@ghost.dsi.unimi.it (marco piovanelli) writes:
- > Now: IM 6 says I should put in the nmIcon field of a NM request record
- > a *HANDLE TO AN ICON FAMILY*. What does this mean exactly?
- > Should I pass a handle to an ics8 resource, for example?
- > How could the Notification Manager tell a handle to a SICN from a
- > handle to a resource of a different kind?
-
- Here's what I've reverse engineered:
- An icon family handle is a handle to an array of 10 handles, each of which contains one
- of the various icon resources. (I only know of 6 family members... Maybe Apple's coming out
- with 24x24 icons? icm#'s?) Leave as NIL any members that your family doesn't contain.
- Since notification only uses the small icons, only three of the fields are worth filling in.
- (Yes, I suppose this might change with a future version of the notification mgr, maybe that
- displays a larger icon in the notification dialog, or on systems that have really tall menu
- bars).
- I don't recall what goes where with the larger icons, but for the ics-'s:
- h[4] = GetResource('ics#', which);
- h[5] = GetResource('ics4', which);
- h[6] = GetResource('ics8', which);
- (This is C, with a zero-based array).
- Usual disclaimers apply. Apple probably had some reason for not documenting the icon
- family handle to which I am not privy, but this is what works right now. You probably
- shouldn't try this using 6.0.x or in the presence of small children, housepets, or persons
- with weak hearts.
-
-
- - --
- Scott Lindsey <wombat@claris.com>
-
- ---------------------------
-
- From: ebido@bio.vu.nl (Etienne Bido)
- Subject: Appletalk printing problems
- Date: 8 Apr 92 19:11:12 GMT
- Organization: VU Biology, Amsterdam, The Netherlands
-
- We are having problems printing from our Macs to laserprinters over
- appletalk. It doesn't matter if the laserprinters are in the same zone
- or in a different zone than the Mac. There are several errors that will
- be displayed. (randomly?).The most occuring errors are:
-
- "Problems with appletalk" or
- "A printing error occured" or
- The mac just beeps and stops the printing or
- A complete system hang-up. or
-
- a combination of the above.
-
- Those errors seem to be completely random, sometimes printing goes
- without problems for half an hour. than the errors start, giving
- the different errors randomly.
-
- The only thing we can do is keep trying to print because 1 in every 10
- times it will go through.
-
- Does the mac get influenced by the position of the sun/moon, or the
- winddirection or something? It sometimes looks like it.
- - --
- Etienne Bido |ebido@bio.vu.nl
- Vrye Universiteit |bido@chem.vu.nl
- Amsterdam
- The Netherlands
-
- +++++++++++++++++++++++++++
-
- From: noah@acs.harding.edu
- Date: 9 Apr 92 16:32:04 GMT
- Organization: Harding University
-
- In article <1992Apr8.191112.15100@bio.vu.nl>, ebido@bio.vu.nl (Etienne Bido) writes:
- >We are having problems printing from our Macs to laserprinters over
- >appletalk. It doesn't matter if the laserprinters are in the same zone
- >or in a different zone than the Mac. There are several errors that will
- >be displayed. (randomly?).The most occuring errors are:
- >
- >"Problems with appletalk" or
- >"A printing error occured" or
- >The mac just beeps and stops the printing or
- >A complete system hang-up. or
- >
- >a combination of the above.
- >
- >Those errors seem to be completely random, sometimes printing goes
- >without problems for half an hour. than the errors start, giving
- >the different errors randomly.
- >
- >The only thing we can do is keep trying to print because 1 in every 10
- >times it will go through.
- >
- >Does the mac get influenced by the position of the sun/moon, or the
- >winddirection or something? It sometimes looks like it.
- >--
- >Etienne Bido |ebido@bio.vu.nl
- >Vrye Universiteit |bido@chem.vu.nl
- >Amsterdam
- >The Netherlands
-
- I am curious. Which version of Apple Share are you using. I know that we had
- trouble running Apple share 3.0 and using the *feature* print spooler. We shut
- off print spooler in Apple Share 3.0 and remove print monitor from all the
- machines in the lab. You might try that. Let me know.
- jtn
- e-mail -- noah@acs.harding.edu
-
- +++++++++++++++++++++++++++
-
- From: cpolishe@isis.cs.du.edu (Chuck Polisher)
- Date: 9 Apr 92 21:06:57 GMT
- Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
-
- In article <1992Apr9.113205.482@ualr.edu> noah@acs.harding.edu writes:
- >In article <1992Apr8.191112.15100@bio.vu.nl>, ebido@bio.vu.nl (Etienne Bido) writes:
- >>We are having problems printing from our Macs to laserprinters over
- >>appletalk. It doesn't matter if the laserprinters are in the same zone
- >>or in a different zone than the Mac. There are several errors that will
- >>be displayed. (randomly?).The most occuring errors are:
- >>
- >>"Problems with appletalk" or
- >>"A printing error occured" or
- >>The mac just beeps and stops the printing or
- >>A complete system hang-up. or
- >>
- >>a combination of the above.
- >>
- >>Those errors seem to be completely random, sometimes printing goes
- >>without problems for half an hour. than the errors start, giving
- >>the different errors randomly.
- >>
- >>The only thing we can do is keep trying to print because 1 in every 10
- >>times it will go through.
- >>
- >>Does the mac get influenced by the position of the sun/moon, or the
- >>winddirection or something? It sometimes looks like it.
- >>--
- >>Etienne Bido |ebido@bio.vu.nl
- >>Vrye Universiteit |bido@chem.vu.nl
- >>Amsterdam
- >>The Netherlands
- >
-
- This looks exactly like a situation I had with a network of 25 macs
- with several printers. Trouble was finally diagnosed by polling all
- nodes on the net from one end of the backbone. The responses to the
- poll can be read out on an oscilloscope. What you look for is marginal
- signal amplitude coming back. The "normal" vs troublesome signal
- strengths will be visually very clear. Find a bad wire or connection
- and repair. The trouble is that Appletalk is a very forgiving protocol
- and will tolerate lots of noise without any noticable effects. But
- printer packets get lost and ...
-
- I also had some success with a 230kHz signal source and a 'scope
- to find and fix problems. Usually the net showed about 0.1v drop
- from node to node, each node getting "fainter" as the signal source
- was moved further from the 'scope. The bad link showed a much higher
- drop.
-
- If you are having net problems, this is a pretty good basic check
- since it validates the _physical_ network layer (or is that _electrical_,
- oh well I'm splitting hairs...). E-mail me if you have questions,
- this newsgroup ages off my host pretty quickly and I'm liable to miss
- a posted reply. Good Luck!!!!!
-
- ---------------------------
-
- From: Carl.Constantine@BCSystems.GOV.BC.CA
- Subject: Extra QD Text Styles - how??
- Date: 8 Apr 92 07:36:46 -700
- Organization: BC Systems Corporation
-
- Hi once again netters. While in the process of writting my graphing program, I
- was browsing through ResEdit setting up some of my menus. For my "Styles"
- menu, I want to be able to support the standard QD text styles PLUS Double
- Underline and Strikethrough!! However, as you may well know, these styles are
- not in ResEdit for me to put them in the menu, nor can I find info on how to
- implement these styles. Some Word Processing programs (MS Word, WordPerfect,
- etc.) have these in the menu and so do some drawing programs (SuperPaint).
- Does anyone know where I can find info on 1) how do display this in my style
- menu (do I have to write my own MDEF [man I hope not, could someone supply with
- this if that's what is necessary] ) and 2) how to implement these extra styles
- in my program.
-
- Thanks in advance...
-
- "I am the MacMan"
- Carl B. Constantine (Mac Consultant)
- Christian Computer Services
-
- - --
- Carl.Constantine@BCSystems.gov.bc.ca
- Victoria, British Columbia, Canada
-
-
- +++++++++++++++++++++++++++
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Date: 9 Apr 92 14:10:56 GMT
- Organization: The World Public Access UNIX, Brookline, MA
-
- Carl -
-
- To support double underline and strike-thru, etc...I think you're going to
- need to write an MDEF. See Inside Macintosh for information on writing
- such a beast.
-
-
- - --
- <--------------------------------------------------->
- joe zobkiw zobkiw@world.std.com
- mac.synthesis.MIDI.development.C.asm.communications
- >---------------------------------------------------<
-
- ---------------------------
-
- From: nancywi@ima.isc.com (Nancy Wilson)
- Subject: BalloonWriter
- Date: 2 Mar 92 20:48:07 GMT
- Organization: Interactive Systems, Cambridge MA
-
- I'd like to hear from anyone with experience using this tool-- pros and cons,
- how it compares to AppMaker, any comments on version 170.1. I'm a doc person
- with a tight deadline for delivering balloon help and I need to make a quick
- decision about tools.
-
-
-
-
- +++++++++++++++++++++++++++
-
- From: kscott@dantzig.scd.ucar.edu (Keith Scott)
- Date: 1 Apr 92 20:44:53 GMT
- Organization: UCLA School of Engineering and Applied Science
-
-
- Can I use BalloonWriter to add help ballons to applications
- written in Think C 5.0.2? My problem is that, once I get everything
- set up and click on the "Set Rect & Tip" button in balloonwriter, it
- switches to my application but I don't see the rect and tip. This
- seems to be the case with all Think C programs (including their
- standard 'starter' application). Any suggestions?
-
- Thanks,
-
- keith@seas.ucla.edu
- Keith Scott
-
- ---------------------------
-
- From: bobh@twinkie.bellcore.com
- Subject: Playing non-MIDI frequencies
- Date: 4 Mar 92 16:05:59 GMT
- Organization: Bell Communications Research, Red Bank, New Jersey
-
- Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- touch-tone keypad) and I'm having some problems.
-
- I figured the way to do this would be to build a pure sine-wave wave table,
- and then start playing the appropriate frequencies on mouse-down and stop
- them on mouse-up. Seemed logical at the time.
-
- So, I successfully opened a sound channel to the wave table synth, successfully
- loaded in the sine-wave table, and successfully played the notes at the MIDI
- frequencies. But, unfortunately, the touch tone keypad frequencies are not
- MIDI notes, so I need a way to specify the frequency without using a MIDI
- value.
-
- According to IM V, there is a sound manager command "noteCmd" in which you can
- specify *either* a MIDI value *or* an actual frequency as well as the
- amplitude. But, according to IM VI, the value assigned to "noteCmd" is now
- used for "freqDurationCmd" and the parameters are now for duration and
- MIDI value *only.* Can this really be?????
-
- This appears to be a completely needless compatibility problem as well as a
- step *back* in Sound Manager functionality. Why would they do this, and is
- there *any* way now that I can play sine waves at arbitrary frequencies?
-
- Frustratedly yours,
-
- - -Bob Hettmansperger (bobh@maestro.bellcore.com)
-
- - -------------------------
-
- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
- Date: 4 Mar 92 16:54:13 GMT
- Organization: Kalamazoo College
-
- bobh@twinkie.bellcore.com () writes:
- >Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- >touch-tone keypad)...
- >
- >According to IM V, there is a sound manager command "noteCmd" in which you can
- >specify *either* a MIDI value *or* an actual frequency as well as the
- >amplitude. But, according to IM VI, the value assigned to "noteCmd" is now
- >used for "freqDurationCmd" and the parameters are now for duration and
- >MIDI value *only.* Can this really be?????
- >
- >This appears to be a completely needless compatibility problem as well as a
- >step *back* in Sound Manager functionality. Why would they do this, and is
- >there *any* way now that I can play sine waves at arbitrary frequencies?
-
- It's true. According to a document on AppleLink (which I unfortunately
- don't have here right now), the actual frequency is not supported.
- Actually, if I remember correctly, it never was.
-
- In any case, your best bet would probably be to create a sampled sine
- wave in a 'snd ' resource of the frequency you need. I believe
- HyperCard's old phone dialer stack used such sounds. If you don't want
- to go to the trouble of making up seven sine waves (and playing two at a
- time), you can fudge it by changing the sampleRate value before playing
- the sound--but you didn't hear that from me.
-
- For example, if your 'snd ' sine wave is sampled at 22 KHz, and is a
- 1000 Hz tone, the sampleRate field will be 0x56EE8BA3 == 22254 Hz.
- Multiply that by 1000/1100 and you get about 0x4F0767A8. Plug that into
- sampleRate and execute a bufferCmd. The resulting tone should be about
- 1100 Hz. If you don't do anything silly like initializing the channel
- with initNoInterp or initNoDrop, the Sound Manager will even interpolate
- for you and make it sound OK.
-
- But be careful when you write into those structures, don't do it when
- sound is playing, I don't know what would happen. Like I say, you
- didn't hear this from me...
- - --
- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
- Kzoo randomly kills all my mail; if I don't acknowledge, try resending.
-
- - -------------------------
-
- From: nick@ed.ac.uk (Nick Rothwell)
- Date: 6 Mar 92 12:14:55 GMT
- Organization: Friends of the Salter Duck
-
- Just to nit-pick here. There's no such thing as "MIDI frequencies."
- MIDI note commands just indicate which keys to gate on a (virtual)
- keyboard. The frequencies emitted by a sound generator might be
- totally unrelated to them.
-
- Nick.
- - --
- Nick Rothwell, LFCS, Edinburgh | Tips to confuse a vegetarian #6:
- nick@dcs.ed.ac.uk | serve a venus flytrap salad.
- Mentation Consultancy Services |
- cassiel@cix.compulink.co.uk | ("You mean it's a vegetable but it eats meat?")
-
- +++++++++++++++++++++++++++
-
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Date: 9 Mar 92 11:02:56 +1300
- Organization: University of Waikato, Hamilton, New Zealand
-
- In article <1992Mar4.160559.24912@walter.bellcore.com>,
- bobh@twinkie.bellcore.com () complains that freqDurationCmd (nee noteCmd)
- does not let you specify frequencies other than those corresponding to
- integral MIDI note numbers.
-
- It's true, this is a nuisance, but it is possible to get around it,
- by using rateCmd instead of freqDurationCmd.
-
- First of all, turn off the sound volume on the channel by doing an ampCmd
- with an amplitude of zero. Next, start an infinite-duration sound playing at
- some arbitrary pitch with freqCmd. Then, change the note to the right
- frequency with rateCmd. Finally, make the sound audible with another ampCmd
- with a nonzero amplitude.
-
- This is off the top of my head--the code I wrote that did this is at home.
- Then, of course, you need to figure out a way to cut the note after the
- right duration. I didn't have this problem, as I was playing a note for
- as long as the mouse button was down.
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
-
- +++++++++++++++++++++++++++
-
- From: potts@itl.itd.umich.edu (Paul Potts)
- Date: 27 Mar 92 13:52:58 GMT
- Organization: Instructional Technology Laboratory, University of Michigan
-
- In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
- >Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- >touch-tone keypad) and I'm having some problems.
-
- Sound Manager won't do this - you can only play notes or samples at the
- MIDI note numbers. For playing sine waves, the thing to do is probably to
- build a wave table at your frequency and play it at a standard rate.
- Apparently the math for playing arbitrary notes at arbitrary frequencies is
- very hairy and would be too taxing to play in real time.
-
- For the telephone touch-pad, you might be better off sampling the pitches
- that a real phone creates and playing back the samples.
- - --
- -Paul Potts-potts@itl.itd.umich.edu-
- "The amounts of nicotine that are tolerated by adult smokers can produce
- symptoms of poisoning and could prove fatal if Habitrol systems are applied
- or ingested by children or pets." - Habitrol(TM) drug ad, information sheet.
-
- +++++++++++++++++++++++++++
-
- From: markl@netcom.com (Mark Lentczner)
- Date: 28 Mar 92 01:24:48 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
-
- potts@itl.itd.umich.edu (Paul Potts) writes:
-
- >In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
- >>Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- >>which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- >>touch-tone keypad) and I'm having some problems.
-
- >Sound Manager won't do this - you can only play notes or samples at the
- >MIDI note numbers. For playing sine waves, the thing to do is probably to
- >build a wave table at your frequency and play it at a standard rate.
- >Apparently the math for playing arbitrary notes at arbitrary frequencies is
- >very hairy and would be too taxing to play in real time.
-
- Well, I don't work for Apple (anymore), so don't take this as gospel,
- (but I did design and write the first version of the Sound Manager :-) )...
-
- Yup, you can play ANY frequency you want! Instead of specifiy the
- midi note number in param2 (the long param in a SndCommand) you specify
- a fixed point frequency (16.16 bits, i.e.: 442.5 Hz is $016A 8000).
-
- Realize that for touch-tones (DTMFs) you really have to play two tones
- at once. (Sorry if that was obvious...)
-
- - -mark lentczner
- markl@netcom.com
-
- +++++++++++++++++++++++++++
-
- From: potts@itl.itd.umich.edu (Paul Potts)
- Date: 27 Mar 92 13:52:58 GMT
- Organization: Instructional Technology Laboratory, University of Michigan
-
- In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
- >Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- >touch-tone keypad) and I'm having some problems.
-
- Sound Manager won't do this - you can only play notes or samples at the
- MIDI note numbers. For playing sine waves, the thing to do is probably to
- build a wave table at your frequency and play it at a standard rate.
- Apparently the math for playing arbitrary notes at arbitrary frequencies is
- very hairy and would be too taxing to play in real time.
-
- For the telephone touch-pad, you might be better off sampling the pitches
- that a real phone creates and playing back the samples.
- - --
- -Paul Potts-potts@itl.itd.umich.edu-
- "The amounts of nicotine that are tolerated by adult smokers can produce
- symptoms of poisoning and could prove fatal if Habitrol systems are applied
- or ingested by children or pets." - Habitrol(TM) drug ad, information sheet.
-
- +++++++++++++++++++++++++++
-
- From: markl@netcom.com (Mark Lentczner)
- Date: 28 Mar 92 01:24:48 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
-
- potts@itl.itd.umich.edu (Paul Potts) writes:
-
- >In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
- >>Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- >>which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- >>touch-tone keypad) and I'm having some problems.
-
- >Sound Manager won't do this - you can only play notes or samples at the
- >MIDI note numbers. For playing sine waves, the thing to do is probably to
- >build a wave table at your frequency and play it at a standard rate.
- >Apparently the math for playing arbitrary notes at arbitrary frequencies is
- >very hairy and would be too taxing to play in real time.
-
- Well, I don't work for Apple (anymore), so don't take this as gospel,
- (but I did design and write the first version of the Sound Manager :-) )...
-
- Yup, you can play ANY frequency you want! Instead of specifiy the
- midi note number in param2 (the long param in a SndCommand) you specify
- a fixed point frequency (16.16 bits, i.e.: 442.5 Hz is $016A 8000).
-
- Realize that for touch-tones (DTMFs) you really have to play two tones
- at once. (Sorry if that was obvious...)
-
- - -mark lentczner
- markl@netcom.com
-
- +++++++++++++++++++++++++++
-
- From: potts@itl.itd.umich.edu (Paul Potts)
- Organization: Instructional Technology Laboratory, University of Michigan
- Date: Sun, 29 Mar 92 23:35:45 GMT
-
- In article <ylcjvkdmarkl@netcom.com> markl@netcom.com (Mark Lentczner) writes:
- >potts@itl.itd.umich.edu (Paul Potts) writes:
- >
- >>In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
- >>>Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- >>>which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- >>>touch-tone keypad) and I'm having some problems.
- >
- >>Sound Manager won't do this - you can only play notes or samples at the
- >>MIDI note numbers. For playing sine waves, the thing to do is probably to
- >>build a wave table at your frequency and play it at a standard rate.
- >>Apparently the math for playing arbitrary notes at arbitrary frequencies is
- >>very hairy and would be too taxing to play in real time.
- >
- >Well, I don't work for Apple (anymore), so don't take this as gospel,
- >(but I did design and write the first version of the Sound Manager :-) )...
-
- With all due respect to Mark, this is definitely incorrect in systems
- older than (I'm guessing) 6.0.4. Try passing a value in param 2 and watch
- the sound manager code. The bits get stripped off and only the low 7 get
- examined. The sound manager then does some odd math (it looks odd because
- I'm sure it is optimized to do fixed-point without SANE). It only responds
- properly to values 1..128. Values 128..256 map back to lower notes. Larger
- values produce strange results.
-
- >Yup, you can play ANY frequency you want! Instead of specifiy the
- >midi note number in param2 (the long param in a SndCommand) you specify
- >a fixed point frequency (16.16 bits, i.e.: 442.5 Hz is $016A 8000).
- >
- >Realize that for touch-tones (DTMFs) you really have to play two tones
- >at once. (Sorry if that was obvious...)
-
- This is why it would probably be better to sample the tones - it might be
- touchy to get the two sine waves synchronized to produce just the right
- beat frequencies.
- >
-
- >-mark lentczner
- > markl@netcom.com
-
-
- - --
- Paul Potts - potts@itl.itd.umich.edu
- Un damne' descendant sans lampe,
- Au bord d'un gouffre dont l'odeur
- Trahit l'humide profondeur,
-
- +++++++++++++++++++++++++++
-
- From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
- Date: 30 Mar 1992 17:00:42 GMT
- Organization: UTHSCH Academic Computing
-
- In article <1992Mar27.135258.11955@terminator.cc.umich.edu>, potts@itl.itd.umich.edu (Paul Potts) writes:
- >
- > In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
- > >Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- > >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- > >touch-tone keypad) and I'm having some problems.
- >
-
- This is a Pascal unit I wrote a LONG time ago to play touch tones out the Mac's
- speaker. I make no claims about its correctness, and it definitely uses the
- OLD Sound Manager. (This unit is part of a XCMD...)
-
- Chuck
- - -----------------
- unit TouchTones;
- interface
- uses
- Sane;
-
- const
- ttIllegalTone = -1; (*invalid character passed for touch tone*)
- ttBadVolume = -2; (*volume not between 0-7*)
- ttSndErr = -3; (*sound driver had an error*)
- ttMemErr = -4; (*some sort of memory allocation error happened*)
-
-
- (********************)
-
- function TouchTone (tone: char;
- dur, vol: integer): OSErr;
- (* Play touch tone 0-9,A-D,*,#. *)
-
- implementation
-
-
- (********************)
-
- function TouchTone (tone: char;
- dur, vol: integer): OSErr;
- var
- oldVol: integer;
- fts: FTSynthRec;
- fsnd: ftSoundRec;
- myWave: Wave;
- freqX, freqY: integer;
-
- (********************)
-
- procedure MakeWave;
- var
- i: integer;
- f, pi: extended;
- begin
- pi := arcTan(1) * 4;
- f := 2 * pi / 256;
- for i := 0 to 255 do begin
- myWave[i] := round(sin(i * f) * 120 + 128);
- end;
- end;
-
- (********************)
-
- function FreqToRate (freq: integer): Fixed;
- const
- ratio = 11.778130028;
- begin
- FreqToRate := FixRatio(round(freq * ratio), 1024);
- end;
- (********************)
-
- begin
- if not (vol in [0..7]) then
- TouchTone := ttBadVolume
- else if not (tone in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'a', 'b', 'c', 'd', '*', '#']) then
- TouchTone := ttIllegalTone
- else begin
-
- MakeWave;
- case tone of
- '1', '2', '3', 'A', 'a':
- freqY := 697;
- '4', '5', '6', 'B', 'b':
- freqY := 770;
- '7', '8', '9', 'C', 'c':
- freqY := 852;
- '*', '0', '#', 'D', 'd':
- freqY := 941;
- end;
- case tone of
- '1', '4', '7', '*':
- freqX := 1209;
- '2', '5', '8', '0':
- freqX := 1336;
- '3', '6', '9', '#':
- freqX := 1477;
- 'A', 'B', 'C', 'D', 'a', 'b', 'c', 'd':
- freqX := 1633;
- end;
- with fts do begin
- mode := ftMode;
- sndRec := @fsnd;
- with fsnd do begin
- duration := dur;
- sound1Rate := FreqToRate(freqX);
- sound1Phase := 1;
- sound2Rate := FreqToRate(freqY);
- sound2Phase := 1;
- sound3Rate := 0;
- sound3Phase := 1;
- sound4Rate := 0;
- sound4Phase := 1;
- sound1Wave := @myWave;
- sound2Wave := @myWave;
- sound3Wave := nil;
- sound4Wave := nil;
- end;
- end;
- GetSoundVol(oldVol);
- SetSoundVol(vol);
- StartSound(@fts, sizeof(FTSynthRec), nil);
- repeat
- until SoundDone;
- StopSound;
- SetSoundVol(oldVol);
- TouchTone := noErr;
- end;
- end;
-
- end.
-
- +++++++++++++++++++++++++++
-
- From: REEKES@applelink.apple.com (Jim Reekes)
- Date: 9 Apr 92 20:10:43 GMT
- Organization: Apple Computer, Inc.
-
- In article <6293@lib.tmc.edu>, cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes:
- >
- > In article <1992Mar27.135258.11955@terminator.cc.umich.edu>, potts@itl.itd.umich.edu (Paul Potts) writes:
- > >
- > > In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
- > > >Help, I feel betrayed. I want to play some pure sine-waves of frequencies
- > > >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
- > > >touch-tone keypad) and I'm having some problems.
- > >
- >
- > This is a Pascal unit I wrote a LONG time ago to play touch tones out the Mac's
- > speaker. I make no claims about its correctness, and it definitely uses the
- > OLD Sound Manager. (This unit is part of a XCMD...)
- >
- > Chuck
- >
- > lots 'o code followed...
-
-
- There's an easier method. Get the 'snd ' resources out of HyperCard 2.0 or
- later. It contains samples of the actual telephone frequencies. You knew
- that HyperCard supported the "DIAL" command didn't you? Well it does,
- and it does it using a simple method.
-
- So, ya wanna do dial tones just like HyperCard? Well, that's not so hard (as
- long as you are patient enough to read through all the Sound Manager documents
- and beat your head against the wall for half an hour, like I did). The
- technique is simple: lift the 'snd ' resources from HyperCard and use them to
- generate dial tones! (Yes, that's OK, dtmf tones are generic sounds; just
- don't lift any of the other sounds!)
-
- Start by using ResEdit to copy 'snd ' resources #130-145 from the HyperCard
- program file (I got them out of 2.0). Next use the Sound Manager to play them
- and to use them as an instrument definition for the samplesynth. Since this
- can be tricky, and since you may or may not want dive deep into the Sound
- Manager, I am including a generic subroutine that I wrote that will "dial" for
- you. All I ask is that if you use it "as is" in your application, please
- remember me in your prayers.
-
- How to use the dial procedure:
-
- To call the dial procedure simply pass it a string and it will do the rest.
- All digits A thru D, # and * play the proper tone for the touch tone key; any
- other characters generate a 1/2 second delay. Each tone is sounded for about
- 1/4 second. The interface to it is simply: Procedure Dial(theNum:Str255).
- Please note that in order to keep this short, very little error checking has
- been added, please add any/all that you need.
-
- And now for the fabulous source code:
-
- PROCEDURE Dial(theNum: Str255);
-
- VAR
- i : Integer;
- theSound : Handle;
- theResNum : Integer;
- dummy : LongInt;
- err : OSErr;
- chan : SndChannelPtr;
- cmd : SndCommand;
-
- BEGIN
- IF Length(theNum) = 0 THEN
- Exit(Dial);
-
- chan := NIL; {allocate a channel}
- err := SndNewChannel(chan, sampledSynth, 0, NIL);
- IF err <> noErr
- Exit(Dial);
-
- FOR i := 1 TO Length(theNum) DO BEGIN
-
- CASE theNum[i] OF
- '0'..'9': theResNum := ord(theNum[i]) - ord('0') + 130;
- 'A'..'D': theResNum := ord(theNum[i]) - ord('A') + 140;
- '*': theResNum := 144;
- '#': theResNum := 145;
- OTHERWISE theResNum := 0;
- END;
-
- IF theResNum <> 0 THEN BEGIN
- {Load the proper sound resource}
- theSound := GetResource('snd ', theResNum);
- HLock(theSound);
-
- {See sound manager docs for resource format of}
- {type 2 sounds for more info}
- cmd.cmd := soundCmd;
- cmd.param1 := 0;
-
- {This next line ASSUMES it was a format 2 'snd ' resource}
- {This will not work for other 'snd ' resources}
- cmd.param2 := ORD4(theSound^) + 14;
- err := SndDoImmediate(chan, cmd);
-
- {Now send the freqDurationCmd to play a middle C}
- {that's how the instrument was defined in HyperCard}
- cmd.cmd := freqDurationCmd;
- cmd.Param1 := 4000; {2 seconds in duration}
- cmd.Param2 := $FF000000 + 60; {Loud + Middle c}
- err := SndDoImmediate(chan, cmd);
-
- END ELSE
- Delay(30, dummy); {all nonDTMF characters produce a delay...}
- END;
- err := SndDisposeChannel(chan, false);
- HUnlock(theSound);
- END;
-
-
- - -----------------------------------------------------------------------
- Jim Reekes, E.O. | Macintosh Toolbox Engineering
- | Sound Manager Expert
- Apple Computer, Inc. | "All opinions expressed are mine, and do
- 20525 Mariani Ave. MS: 81-KS | not necessarily represent those of my
- Cupertino, CA 95014 | employer, Apple Computer Inc."
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-